package hopital.ui;

import com.alee.laf.table.WebTable;
import java.util.Vector;

public class Table extends WebTable {

    private static final long serialVersionUID = 1L;
    private final javax.swing.table.DefaultTableModel _model;

    public Table() {
        _model = new javax.swing.table.DefaultTableModel();
        setModel(_model);

    }


    @Override
    public boolean isCellEditable(int row, int column) { // custom isCellEditable function
       return false;
    }
    
    @Override
    public javax.swing.table.DefaultTableModel getModel() {
        return _model;
    }

    public void addColumn(String arg0) {
        _model.addColumn(arg0);
    }

    public void addRow(Vector<Object> arg0) {
        _model.addRow(arg0);

    }

    public void addColumns(Object... args) {
        for (Object _s : args) {
            _model.addColumn(_s);
        }
    }

    public void addRows(Vector<Object>... args) {
        for (Vector<Object> _v : args) {
            _model.addRow(_v);
        }
    }

    public void removeRow(int arg0) {
        _model.removeRow(arg0);
    }

    public void removeColumns() {
        _model.setColumnCount(0);
    }

    public void removeRows() {
        _model.setRowCount(0);
    }
}
